import { CascaderProps, CascaderValue } from "element-plus";

type Opt = {
	label: string;
	value: string | number;
	children?: Opt[];
};

export type CascaderType = {
	lazy?: CascaderProps;
	placeholder?: string;
	//是否禁用
	disabled?: boolean;
	options?: Opt[];
	// 指定 change 事件第二个参数返回值
	valueKeys?: "value" | "label" | "object";
	// 是否可搜索
	filterable?: boolean;
	change?: (value: CascaderValue, cascaValue: any) => void;
	appendButton?: {
		confirm?: (val: number[] | string[], _val: any, _close: () => void) => void;
		cancel?: () => void;
	};
	// 是否显示清除按钮，默认显示
	clearable?: boolean;
};
